This invention relates generally to the Universal Serial Bus (USB) and more particularly to ensuring that a minimum amount of bandwidth is allocated to a particular device.
The Universal Serial Bus (USB) is a peripheral bus specification developed by personal computer (PC) and telecommunication industry companies that brings the plug and play features of computer peripherals outside the PC box. This eliminates the need to install cards into dedicated computer slots and reconfigure the system. Personal computers equipped with USB allow computer peripherals to be automatically configured as soon as they are physically attached. This eliminates the need to reboot or run setup software. USB also allows multiple devices to run simultaneously on a computer, with dedicated hubs and peripherals such as monitors and keyboards also acting as additional plug-in sites.
The Universal Serial Bus is defined in the Universal Serial Bus Specification, revision 1.1, Sep. 23, 1998 which is hereby incorporated herein by reference. This document is available from the USB Implementers Forum web page at http://www.usb.org. Also under development is USB 2.0 which is intended to be fully compatible with USB 1.1 and extend performance by up to 40 times over existing capabilities and use the same cables and connectors.
USB is implemented as a xe2x80x9csharedxe2x80x9d bus. In other words, there can be multiple active devices connected to the USB bus with each active device getting a portion of the total available USB bandwidth. Unfortunately, this characteristic can cause problems with some types of devices. For example, a writeable compact disc drive, such as a CD-R or CD-RW drive, may use disc-at-once or track-at-once recording modes. In a disc-at-once recording mode, recording never stops until the entire disc has been created. In track-at-once, recording only stops at track boundaries. The limited availability of stopping times during recording can cause a problem called xe2x80x9cbuffer underrun.xe2x80x9d A buffer underrun occurs when the host computer or bus cannot supply data to the drive at a rate at least equal to the speed that the drive is writing data to the media. To illustrate, if a drive capable of xe2x80x9c4Xxe2x80x9d write speed, it can write data to the media at 600 kilobytes per second (KB/sec). Therefore, the host computer, and the bus connecting the computer to the drive, must be able to sustain a 600 KB/sec data transfer rate to the drive or the drive would require a data buffer that is too large to be practical. If the host computer and bus cannot sustain a 600 KB/sec data transfer rate, then the drive may run out of data when it is not a valid stopping point. This will cause an error to occur and may ruin the media being written.
When drives or other devices with these type of limitations are connected to a USB bus, they may be writing some media in one of the modes discussed above. If the user begins using another device on the USB bus, the bandwidth available for the drive is reduced. If this reduction in bandwidth is large enough, the bandwidth allocated to the drive may not be enough to maintain the necessary sustained data transfer rate to the drive and a buffer underrun error may occur.
Accordingly, there is a need in the art for a method and apparatus that guarantees a minimum data transfer rate across a USB bus to and from certain devices. It is desirable that such method and apparatus be easy to implement from a user""s point of view. It is also desirable that such method and apparatus work with devices that conform to the USB device specifications so that existing and future devices and existing and future USB busses do not need to be redesigned or altered.
In a preferred embodiment, the invention provides a minimum sustained data transfer rate to a chosen device connected to a USB bus. A set of filter drivers are inserted in the driver stacks for at least two USB devices. These filter drivers are controlled by a filter driver controller that provides and receives information from the filter drivers. When a particular device needs a minimum sustained bandwidth for a transaction, the filter driver for that device notifies the filter driver controller. The filter driver controller then instructs the filter drivers for at least one other device to start interfering with USB transactions. This interference may be to temporarily delay one or more transactions to one or more of the other devices until more bandwidth is available. This interference may also take the form of intercepting transactions from one or more of the other devices and returning an error condition. This interference may also be implemented by signaling the host computer that one or more of the other devices is disconnected from the USB bus. Then when the non-interfered with device no longer needs the minimum sustained data rate, the host computer is signaled that the device has been reconnected. This interference prevents the interfered with devices from using any of the USB bus bandwidth thereby providing a minimum sustained bandwidth to the non-interfered with device. Other aspects and advantages of the present invention will become apparent from the following detailed description, taken in conjunction with the accompanying drawings, illustrating by way of example the principles of the invention.